﻿<?xml version="1.0" encoding="utf-8" ?>
<Batch 
    xmlns="http://schemas.dbshell.com/core"
    xmlns:rds="http://schemas.dbshell.com/datasync"
    xmlns:excel="http://schemas.dbshell.com/excel"
    >

    <excel:Open File="rds.xlsx" />
    <rds:SyncModel >
        <rds:SyncModel.Sources>
            <rds:Source >
                <rds:Source.DataSource>
                    <excel:Sheet SheetName="List1" />
                </rds:Source.DataSource>
                <rds:SourceColumn Name="Id" IsKey="True" />
                <rds:SourceColumn Name="A" />
            </rds:Source>
            <rds:Source >
                <rds:Source.DataSource>
                    <excel:Sheet SheetName="List2" />
                </rds:Source.DataSource>
                <rds:SourceColumn Name="A" />
                <rds:SourceColumn Name="B" />
                <rds:SourceColumn Name="C" />
            </rds:Source>
        </rds:SyncModel.Sources>

        <rds:SyncModel.Targets>

            <rds:Target TableName="ExcelTarget" >
                <rds:TargetColumn Name="IdOriginal" Source="Id" IsKey="True"/>
                <rds:TargetColumn Name="A" Source="A" />
                <rds:TargetColumn Name="B" Source="B" />
                <rds:TargetColumn Name="C" Source="C" />
            </rds:Target>
            
        </rds:SyncModel.Targets>
    </rds:SyncModel>
    
    <rds:Run />

   <excel:Close />

</Batch>
